import request from '@/utils/request'

//新增项目监控指标
export function addProjectMonitor (data) {
  return request({
    url: '/projectMonitor/addProjectMonitor',
    method: 'post',
    data
  })
}

//启用、停用项目总结配置。返回更新后的状态。1：启用，0：停用
export function changeStatus (id) {
  return request({
    url: `/projectMonitor/changeStatus/` + id,
    method: 'put'
  })
}

//删除项目每日总结配置
export function deleteProjectMonitor (id) {
  return request({
    url: '/projectMonitor/deleteProjectMonitor/'+ id,
    method: 'delete'
  })
}

//编辑项目监控指标
export function editProjectMonitor (data) {
  return request({
    url: '/projectMonitor/editProjectMonitor',
    method: 'post',
    data
  })
}

//列出所有监控指标
export function listMonitorIndicator () {
  return request({
    url: '/projectMonitor/listMonitorIndicator',
    method: 'get'
  })
}

//分页查询项目监控指标
export function queryProjectMonitor (params) {
  return request({
    url: '/projectMonitor/pageQueryProjectMonitor',
    method: 'get',
    params: params
  })
}

//查看项目监控指标
export function getProjectMonitorDetail (id) {
  return request({
    url: '/projectMonitor/getById/'+id,
    method: 'get'
  })
}
